Flex is a fast lexical analyser generator for C and C++. It is derived from software contributed to Berkeley by Vern Paxson and is copyright the Regents of the University of California. This is free ware.
Pursuant with the rules on copying: This product includes software developed by the University of California, Berkeley and its contributors.
THIS SOFTWARE IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Please send all comments, queries, suggestions, offers of work and contributions (monetary or otherwise) to me at either of the above addresses. Cash or work from any commercial users would be especially appreciated, as I have to make a living from writing software as I am self employed.
This release contains only the source files necessary to build Flex for the Mac and MPW. The original, and complete, source is available from any good GNU ftp site. This release features:
• all Flex and BYacc tables stored in resources
• skeleton source tuned for MPW
• skeleton source in ‘TEXT’ resource 128 (easily editable)
• fully formatted MS Word (5.1) manual
• some bug fixes to the original 2.5.2 source
The binary version of Flex was created using MPW 3.4b4 and Symantec C 8.0.1c11 and the 2.0a3 universal headers, all from ETO #17. (It does not use the new runtime libraries). Although it will work with earlier version of any of these it may well require additional changes to the source code.
Recompiling
To recompile the source code enter the following lines into an MPW worksheet:
Set CDebugOpts '-opt off -mbg on -d YYDEBUG=1'
if you want the ‘debug’ version, or
Set CDebugOpts '-opt all -mbg off'
if you want the ‘no debug’ version. Then, assuming the source files are in the folder ‘flex-2.5.2’ on a disc called ‘Ram’, enter:
‘S=’ specifies the source directory (which should be the current directory),
‘O=’ specifies the object files’ directory, and
‘CDebugOpts=’ specifies any extra options for the C compiler.
You may ignore the 5 ‘possible unintended assignment’ warnings while compiling ‘parse.c’. Note: compiling the file ‘scan.c’ with the ‘-opt all’ option may take several minutes.
To Do:
• Auto generation of resource files
• Build a PowerPC version (unfortunately I only have a Powerless™ Macintosh ;-()
• Change to GNU’s getopt for greater consistency
• Provide a commando interface
• Produce a manual in a more ‘politically correct’ format